import Vue from 'vue'
import Router from 'vue-router'

import Order from '@/views/order'
import Login from '@/views/login'
import AppLogin from '@/views/applogin'
import AppLoginOrder from '@/views/apploginorder'
import Applyfirst from '@/views/applyfirst'
import pay from '@/views/pay'
import Applysecond from '@/views/applysecond'
import Applythird from '@/views/applythird'
import Creatorder from '@/views/creatorder'
import Addressmg from '@/views/addressmg'
import EditAddress from '@/views/editAddress'
import Orderdetail from '@/views/order/orderdetail'
import Editorder from '@/views/editorder'
import Delay from '@/views/delay'
import orders from './order'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            name: 'Login',
            component: Login,
            meta:{
                title:'登录' // 标题设置在这里
            }
        },
        {
            path: '/applogin',
            name: 'applogin',
            component: AppLogin,
            meta:{
                title: 'App登录'
            }
        },
        {
            path: '/apploginorder',
            name: 'apploginorder',
            component: AppLoginOrder,
            meta:{
                title: 'App登录'
            }
        },
        {
            path: '/order',
            name: 'Order',
            component: Order,
            meta:{
                title:'我的订单' // 标题设置在这里
            }
        }, {
            path: '/applyfirst',
            name: 'Applyfirst',
            component: Applyfirst,
            meta:{
                title:'填写信息' // 标题设置在这里
            }
        }, {
            path: '/pay',
            name: 'pay',
            component: pay,
            meta:{
                title:'支付保函' // 标题设置在这里
            }
        },{
            path: '/applysecond',
            name: 'Applysecond',
            component: Applysecond,
            meta:{
                title:'填写基本信息' // 标题设置在这里
            }
        }, {
            path: '/applythird',
            name: 'Applythird',
            component: Applythird,
            meta:{
                title:'上传资料' // 标题设置在这里
            }
        }, {
            path: '/creatorder',
            name: 'Creatorder',
            component: Creatorder,
            meta:{
                title:'创建订单' // 标题设置在这里
            }
        },

        {
            path: '/addressmg',
            name: 'Addressmg',
            component: Addressmg,
            meta:{
                title:'邮寄地址管理' // 标题设置在这里
            }
        }, {
            path: '/editAddress',
            name: 'EditAddress',
            component: EditAddress,
            meta:{
                title:'编辑邮寄地址' // 标题设置在这里
            }
        },

        {
            path: '/orderdetail',
            name: 'Orderdetail',
            component: Orderdetail,
            meta:{
                title:'保函详情' // 标题设置在这里
            }
        }, {
            path: '/editorder',
            name: 'Editorder',
            component: Editorder,
            meta:{
                title:'保函编辑' // 标题设置在这里
            }
        },

        {
            path: '/delay',
            name: 'Delay',
            component: Delay,
            meta:{
                title:'申请延期' // 标题设置在这里
            }
        },

        {
            path: '/join/audit',
            name: 'join-audit',
            component: function () {
                return import( /*webpackChunkName: 'join'*/ '@/views/join/audit')
            },
            meta:{
                title:'加入企业组申请' // 标题设置在这里
            }
        }, {
            path: '/join/list',
            name: 'join-list',
            component: function () {
                return import( /*webpackChunkName: 'join'*/ '@/views/join/list')
            },
            meta:{
                title:'企业组用户列表' // 标题设置在这里
            }
        },

        {
            path: '/info',
            component: function () {
                return import( /*webpackChunkName: 'info'*/ '@/views/info/index')
            },
            name: 'info-page',
            meta: {
            title: '提示'
            }
        },
        {
            path: '/applyRefund',
            component: function () {
                return import( /*webpackChunkName: 'info'*/ '@/views/order/applyRefund')
            },
            name: 'applyRefund',
            meta: {
                title: '申请退款'
            }
        },

        {
            path: '/paynew',
            component: function () {
                return import( /*webpackChunkName: 'info'*/ '@/views/payNew/index.vue')
            },
            name: '',
            meta: {
                title: '支付'
            }
        },

        {
            path: '/zhonghua-guarantee/apply',
            component: function () {
                return import( /*webpackChunkName: 'info'*/ '@/views/zhonghua-guarantee/apply.vue/')
            },
            name: '',
            meta: {
                title: ''
            }
        },



        orders
    ]
})
